<template>
	<view class="cell">
		<slot class="icon-avatar" name="left"></slot>
		<view class="title" name="title">{{title}}</view>
		<slot name="right"></slot>
	</view>
</template>

<script>
	export default {
		name: "cell",
		props: {
			title: {
				type: String,
				default: '标题'
			},
			right: {
				type: Boolean,
				default: false
			},
		},
	}
</script>

<style>
	.cell {
		background-color: #fff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 40px;
		box-sizing: border-box;
		padding: 0 20px;
	}
	.title {
		flex: 1;
		margin-left: 10px;
		line-height: 40px;
		border-bottom: 1px solid #eee;
	}
</style>
